package com.yihaodian.search.code.model;

import java.util.List;
import java.util.Map;

import com.yihaodian.api.search.facet.FacetResult;

public class SearchResult {
	public static int pageSize = 10;
	private String keyword;
	
	private List<SourceHit> sources;
	
	private Map<String, FacetResult> facetResults;

	public String getKeyword() {
		return keyword;
	}

	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}

	public List<SourceHit> getSources() {
		return sources;
	}

	public void setSources(List<SourceHit> sources) {
		this.sources = sources;
	}
	
	/**
	 * TODO: Paging attribute
	 */
	// 总共的数据量
	private int total;
	 
	// 共有多少页
	private int totalPage;
	 
	// 当前是第几页
	private int currentPage;

	public int getTotal() {
		return total;
	}

	public void setTotal(int total) {
		this.total = total;
	}

	public int getTotalPage() {
		return total/pageSize + 1;
	}

	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}

	public int getCurrentPage() {
		return currentPage;
	}

	public void setCurrentPage(int currentPage) {
		this.currentPage = currentPage;
	}

	public Map<String, FacetResult> getFacetResults() {
		return facetResults;
	}

	public void setFacetResults(Map<String, FacetResult> facetResults) {
		this.facetResults = facetResults;
	}

}
